/*
 * devices.h
 * 
 * Team: 11
 * Author: Tarl Hahn
 * Version: 1.0
 *
 * devices simulates both i/o devices and system timers
 * 
 */
 
 #ifndef DEVICES_H
 #define DEVICES_H
 
 // #include InterruptManager <-- name may change...
 
 
 #define TIMER 0 
 #define NETWORK 1
 #define DISK_IO 2
 #define H_I_D_IO 3

 
 typedef struct dev
 {
	char* name; // name of the device
	int type; // type of device.  I.E. Timer, Disk i/o, network, Human interface i/o
	// priority level.  0 is the highest. priority determined by type.
	
	int (*requestService)(struct dev*, int); // request device <-- may not be needed if upon creation
											  // thread is created and waits for a condition var and a signal
											  // before running "service" then goes back into waiting.
	int (*destruct)(struct dev*); // destructs the struct.
	
 } Device;
 
 typedef Device* DevicePtr;
 
 // Constructor
 DevicePtr deviceConstruct(char* name, int type);
 #endif 
 
